home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / COMMS / LIRC.ZIP / !LIRC / !Help < prev    next >
Text File  |  1998-09-09  |  52KB  |  1,228 lines

  1.  
  2.                                      LIRC Help
  3.                                      ---------
  4.  
  5.  
  6. General use
  7. ===========
  8.  
  9. Running this requires some toolbox modules, and obviously an internet stack.
  10.  
  11. It also requires some knowledge of IRC. There are plenty of texts about this,
  12. and I'm not going to repeat it. I will include a couple of links at some point.
  13.  
  14. Clicking Select on the iconbar icon will open a terminal window and attempt to
  15. connect to your chosen server (if either if these things has not already
  16. happened).
  17.  
  18. Clicking Adjust will show the Choices, and these are probably what you will
  19. want to change first.
  20.  
  21.  
  22. Setting up choices
  23. ==================
  24.  
  25. Connection details
  26. ------------------
  27. 'Server' is any irc server you like and have access to. There are a few
  28. common choices supplied (and some not so common), but you will have your own
  29. preferences after a while. The list is stored in the Servers file, and you
  30. can edit this to suit yourself.
  31.  
  32. Be aware, that servers are connected to a certain irc network, and there are
  33. a few of these networks around. Some of them have chosen not to follow
  34. rfc1459 to the letter, and you may have problems with them. For example,
  35. DALnet allows very long nicknames, and will not work with LIRC.
  36. IRCnet, Undernet, and EFnet have been used without problems.
  37.  
  38. 'Retry after' is used if you lose the connection. It will automatically try
  39. to reconnect after the specified time.
  40.  
  41. 'Nick', 'User', 'Password', and 'Real name' are all given to the server when
  42. you connect. Usually you will leave password blank, meaning 'none'.
  43. You might find that the nickname you've chosen is already in use. In this
  44. case LIRC will keep trying, while appending an increasing number to your nick
  45. until it is accepted. If this has happened, you might want to change it to
  46. something else, using the command:
  47. /nick <another_nick>
  48.  
  49. 'User info' and 'Finger info' are not given to anyone, unless they ask with
  50. the corresponding ctcp requests.
  51.  
  52. Terminal windows
  53. ----------------
  54. 'Terminal lines' sets the height of the windows, in lines.
  55.  
  56. 'Initial height' is used when new terminal windows are opened.
  57.  
  58. 'Line spacing' sets the space between lines, in pixels.
  59.  
  60. 'Left margin' and 'Right margin' will leave leave extra space to the left or
  61. right of the actual window content. Note than if you change this, it will only
  62. have effect when new lines are printed in the window.
  63.  
  64. 'History lines' defines how many commands will be stored in the history
  65. before it starts discarding the oldest ones.
  66.  
  67. 'Auto CAPS' turns on a special feature, that is not very style-guideish.
  68. When the caret is gained, a local CAPS state applies. When it is lost,
  69. the previous state is restored. This can be very handy, but you need to
  70. be aware of what is happening.
  71.  
  72. 'Auto-open friends' will enable opening of new terminal windows automatically.
  73. This can be a great irritation if it is done when anybody sends you a message
  74. (e.g. spam-bots etc.). So only people that are listed as 'friends' will
  75. make a new window open when they speak to you privately.
  76.  
  77. 'Indent wrapped lines' will make extra space before any lines that are wrapped
  78. because they wouldn't fit on one terminal line. The space added will correspond
  79. to the prefix used.
  80.  
  81. 'Display bold text' refers to text containing ascii 2. If this is turned on,
  82. such a character will switch to a brighter version of the colour. The next
  83. one will switch back.
  84.  
  85. 'Display coloured text' is the same kind of effect, but this refers to the
  86. "miRC colours", turned on and off with ascii 3.
  87.  
  88. 'Bold/colour entry using ...' will enable you to enter colour/bold effects
  89. yourself, using the character you set up (default is '~'). See below for
  90. details on this. Be aware, that use of colours are frowned upon by many people,
  91. and some channels will instantly (and automatically) ban you for it.
  92.  
  93. General use
  94. -----------
  95. 'Import period' is used when you drag a text file to the entry-icon. The file
  96. will be sent to the current channel, one line at a time. The Import period
  97. is how long a pause there is between each line sent.
  98. If you set this lower (i.e. faster) than 'Message penalty' (see below), long
  99. files will cause lines to queue up in the output buffer. This can be confusing,
  100. so don't do it unless you have a specific reason.
  101.  
  102. 'Time format' describes the format of the date/time printed in the window or
  103. put into the log file. It is not used by default, but can be turned on by
  104. redefining the Style (see below).
  105.  
  106. 'Logging' turns on and off the log files. These are stored in the 'Logs'
  107. directory, given a name that says when they were started.
  108.  
  109. 'Speech' turns on speech, using either Superior Software's Speech! module,
  110. or J. Duddington's !Speak application.
  111.  
  112. 'Cut speech' applies only to !Speak, and will cut off previous sentences
  113. when a new one arrives.
  114.  
  115. 'Fixed lists' makes the People and Channel list windows stay the same visible
  116. size, even when entries are added or removed. They will also scroll down
  117. if a new entry is added, but it would be invisible (below the bottom edge).
  118.  
  119. 'Confirm Quit if connected' will just open a confirmation box if you quit
  120. the program while being connected to the server.
  121.  
  122. 'Smart lists' will have effect if the pointer is over a list when it changes.
  123. The window will be moved so the pointer is still over the same item in the
  124. list. This can be very handy, escpecially if you're about to click on
  125. something.
  126.  
  127. 'WimpCTCP has priority' will give external CTCP apps the first shot at dealing
  128. with a CTCP request, then use the internal ones. Turning it off does exactly
  129. the opposite, and this is the default.
  130.  
  131. Inbound flood protection
  132. ------------------------
  133. This is best left alone unless you have a problem with it. The numbers refer
  134. to the limit before the protection kicks in.
  135. For example: All msgs, Max number = 8, Time = 2.00.
  136. This means that if more than 8 messages are received in under 2 seconds,
  137. it is an offence, and the sending party will be ignored until you say
  138. otherwise.
  139. This protection can be overridden by the list of 'Friends', see below.
  140. The 'General' type applies to everybody, also friends. This watches messages
  141. from anyone, but only the ones directed at you in particular. When it kicks
  142. in, it won't start ignoring everybody, but rather change your nickname. Some
  143. nitwits will attack you by sending messages from 50-100 different bots at once.
  144. While this is no problem for LIRC, it can put a real strain on the server
  145. you're on, and it may disconnect. When your nick changes, all the pending
  146. messages are discarded by the server. So it is less likely to kill you.
  147. All this 'attacking' might seem like strange behaviour to you and me, but the
  148. attackers don't know that, because they are nitwits.
  149.  
  150. Outbound flood protection
  151. -------------------------
  152. This is protection against being kicked off the server for sending too much
  153. data too quickly. You can alter this because different servers (and networks)
  154. impose different limits. It is not easy to find out exactly what the limit is
  155. on a given server, and the easiest is probably to ask the administration. If
  156. you ever get kicked off with the reason "Excess flood", either the 'Message
  157. penalty' or the 'Time base' is set too low.
  158.  
  159. The explanation of what happens to your outgoing messages is as follows:
  160. Assume a Time base of 10 sec, and a Message penalty of 2 sec.
  161. If you send messages with 2 seconds or more between them, nothing special
  162. happens at all, they are just sent. If you send them faster, with e.g. 1.5
  163. seconds in between, the remaining 0.5 second penalty is added to a total every
  164. time. When this total is more than 10 seconds (i.e. after 20 messages), they
  165. start being put on hold in a queue (this is when the server would have kicked
  166. you off). The queued messages are then sent off as time passes, exactly when
  167. it's safe to do so.
  168. While this is happening, the bar at the left of the input line is all red.
  169. This bar shows the 'penalty total' mentioned, and goes from 0 (all grey) to
  170. 'Time base' (all red).
  171.  
  172. The practical upshot of which is, that if you ever see an all-red bar, you
  173. will know that whatever message you enter, it will not be sent immediately.
  174.  
  175. Reaction times
  176. --------------
  177. These all refer to the duration of various events.
  178.  
  179. 'Doubt nick/channel after' controls how often a nick or channel will be
  180. checked to see if it still exists. This only happens if nothing has been
  181. heard from the nick/channel for this amount of time.
  182.  
  183. 'Nick/channel activity' refers to the green 'activity bars' you can add to
  184. the People/Channel lists (see below). These times define how long it takes
  185. for the bars to disappear.
  186.  
  187. 'Open…' will open the choices directory in !Boot. This is handy for getting
  188. at those files when you want to edit them.
  189.  
  190. 'Save&use' and 'Use' are self-explanatory, except you should know that also
  191. the colour choices are saved when you click Save & Use.
  192.  
  193. Note that when you save the choices, or any of the other lists that can be
  194. saved, they will be stored in <Choices$Write>. This means that the default
  195. choices in the application directory are unchanged, and you can overwrite
  196. with a newer version without losing your saved choices. It also means that
  197. you can revert to the default settings by deleting one or more files in the
  198. !Boot.Choices.IRC.LIRC directory.
  199.  
  200.  
  201. Terminal windows
  202. ================
  203.  
  204. The Terminal windows are where all the text appears that you receive and
  205. send.
  206. If the window has a target (displayed in the title), you will have the
  207. ability to execute certain commands on that target from the menu.
  208. You can also open the People or Channels lists, which will be described
  209. later.
  210. The Selection submenu is very simple, just allows you to Select all and
  211. Clear selection.
  212. Lastly, you can redefine the colours and voices used, and your own face.
  213.  
  214. If you have selected something, you can treat it almost as a text file in a
  215. filer window. That means you can drag the selection (from within it) to any
  216. other program, or a filer-directory, and it will be copied there. You can
  217. also drag it to the entry icon beneath, and have it entered as commands. Or
  218. you can double-click on it, and have it run like a text file would. When
  219. saving it to disc, it gets a name that is related to the window's target.
  220. If you want to drag from a window that isn't current, and want to keep it that
  221. way, hold shift when you click.
  222.  
  223. URLs will be recognised if they contain "://". They will then become "URL
  224. colour" (default yellow), and you can launch them by double-clicking.
  225.  
  226. If you drag a Zap font file into the window, that font will be used. These
  227. are usually found somewhere in !Zap.Fonts. It will be copied as part of your
  228. choices, and you don't need to 'save choices' to keep it.
  229.  
  230. Dragging a different file into the window will prepare a DCC transfer of
  231. that file to the target. The title bar shows the current target at all times.
  232. This also works with selected parts of windows. You can't DCC a whole channel,
  233. so any attempts at this will be ignored.
  234.  
  235. Anything you type into the 'entry icon' below, will be sent to the current
  236. target. The exception to this is lines starting with '/'. These are commands,
  237. either to LIRC or to the irc server. I won't explain much about them here,
  238. because there is help on every one of them, which you can access by typing
  239. '/?'. If a command is not understood, it is sent to the server, which might
  240. know what to do.
  241.  
  242. The buttons below the entry icon are called 'Macros' for want of a better name.
  243. They are defined in the !Macros file, and you can make your own.
  244. This can be done by editing the file, and saying "/load macros".
  245. Or you can shift-click on a button. The command that will define it is put
  246. into the entry-icon, and you can examine and edit it.
  247. If you want to keep your redefined macros, use "/save macros".
  248.  
  249. Other functions of the terminal window are:
  250. * Clicking in the window makes it 'current', and it gains the entry-box.
  251. * Double clicking on an URL (that shows up yellow), will launch it.
  252. * Pressing TAB in an empty entry icon, will type in '/msg <last>', where <last>
  253.   is the last person that sent you a private message (or a ctcp).
  254. * Shift-TAB will open a new terminal window to that person instead.
  255. * Pressing TAB in front of some word, will 'complete' that word.
  256.   If the word starts with '/', it will complete the command.
  257.   If it starts with '#' or '&', it will complete a channel name (using the ones
  258.   in the channel list).
  259.   If there is a space before it, it will complete a nick, using the 'People'
  260.   list.
  261. * Pressing up or down arrow will recall previous commands/messages from the
  262.   history.
  263. * Pressing Shift-up/down arrow will select the previous/next terminal window.
  264. * Pressing Return executes the command or sends the message, and clears the
  265.   icon. Shift-Return will do the same, but leaves the text in the icon.
  266. * Ctrl-C will 'copy' the current selection, sending it to the current target
  267.   one line at a time. If there is something in the entry-line at the time,
  268.   the selection will be prefixed with whatever is to the left of the caret,
  269.   and postfixed with the part to the right.
  270.  
  271. List of people
  272. ==============
  273.  
  274. This list contains nicknames known to LIRC. People become known when they do
  275. something that you can see - sending you a message, being in a channel you're
  276. examining, etc.
  277.  
  278. The appearance of the list is user-defined. The 'NickLine' file contains
  279. instructions about how the list looks, and what happens when you click
  280. in it. The description below applies to the default 'NickLine'.
  281.  
  282. There are several things you can do to each nick. Some of them are accessible
  283. from the menu, and from clicking in the window:
  284. 'Query'  selects that nick as the current target. The same happens when you
  285.          click Select on the nick.
  286. 'WhoIs'  requests information (from the server) about that nick. The same
  287.          happens when clicking Select on the '?' button.
  288. 'Trace'  requests a trace of the route to that nick.
  289. 'Op'     makes that person an operator on the current channel, if you are an
  290.          operator yourself. The same happens when clicking Select on the 'op'
  291.          button.
  292. 'DeOp'   takes away operator status from that person. Also only works if you
  293.          are an operator. The same happens when clicking Adjust on the 'op'
  294.          button.
  295. 'Kick'   kicks a person off the current channel. You need to be op for this too.
  296.          The same happens when clicking Select on the 'boot' button.
  297. 'Forget' removes the nick from the list. It will reappear if the person does
  298.          something 'visible' again. A person who is on a channel with you is
  299.          always visible, so you can't remove those.
  300. The 'CTCP' submenu contains other functions. All of them sends a ctcp of that
  301. type to the person in question.
  302.  
  303. Clicking Adjust on the face to the left of the nick, requests that person's
  304. face. Normally used when you haven't got it already.
  305.  
  306. Clicking on the 'square' button will open/close a window with the nick as the
  307. target. This is handy for initiating a private conversation.
  308.  
  309. Clicking on the 'no entry' button registers/unregisters a ban on that person's
  310. hostmask (in the current channel). You need to be operator to do that.
  311.  
  312. Clicking on the 'garbage can' button will filter out all or nothing of what
  313. comes from that person's hostmask. See the help on /ignore for details.
  314.  
  315. Clicking on the 'smiley' button will register/unregister that person as a
  316. friend. Friends can flood you without the flood protection kicking in (but
  317. if it's bad, the general protection will).
  318.  
  319. Dragging a file to a nick, will prepare for a DCC transfer to that person.
  320. You need to accept the transfer before it actually starts.
  321.  
  322. Clicking on the hostmask will send a Info DNS ctcp to yourself. If !IRCInfo
  323. is available, this will return DNS information about that host.
  324.  
  325.  
  326. Format of faces
  327. ---------------
  328.  
  329. A face sprite must be 16 by 16 pixels. It is 16 colour greyscale, with a
  330. palette going from black (0) to white (15). ChangeFSI can generate these, if
  331. you set it to 16 colours (square pixels), and Special mode "t".
  332. Using the 'Your face' box is the easiest way of registering your own sprite.
  333.  
  334.  
  335. List of channels
  336. ================
  337.  
  338. Like the list of people, this contains a list of known channels. These are
  339. channels that have been seen, plus any in the 'Channels' file. You can use
  340. "/save channels" to save the list, and then add any channels you want to
  341. be known at startup. They will start disappearing if they don't actually
  342. exist.
  343.  
  344. Again, the list is defined in 'ChanLine'. The following is for the default
  345. ChanLine file.
  346.  
  347. The small green bar shows activity in the channel.
  348. Clicking Select on a channel will make it the current target.
  349. Select/Adjust on the square will open/close a window, like above.
  350. Select on the '?' button requests a list of the people on that channel.
  351. Adjust will enquire about the mode of that channel.
  352. Select on the '+' button will make you join that channel.
  353. Adjust makes you leave.
  354.  
  355. The menu has the some of the same functions, plus the ability to change the
  356. topic. You need to be op on the channel to do that.
  357.  
  358. You can also make CTCP requests to the channel. The populations of many
  359. channels will regard this as annoying behaviour.
  360.  
  361. To open a list of Members (below), choose the 'Members…' entry. You must have
  362. joined the channel for this to work.
  363.  
  364.  
  365. List of members
  366. ===============
  367.  
  368. The member lists each applies to a channel you have joined, and contains the
  369. people in that channel. Unlike the other lists, these are kept up to date
  370. with no 'reaction' time. And the functions available are easier to use, as
  371. both the nick and channel names are known.
  372. The 'MembLine' file contains the format of these lists.
  373. The default MembLine file is almost identical to the NickLine file, with
  374. the exception that the 'op' button shows the current op status. This is
  375. possible because the channel is known. Otherwise it works like the People
  376. list. There is no 'Forget' menu entry, because of the abovementioned update
  377. method.
  378.  
  379.  
  380. Format of NickLine, ChanLine & MembLine
  381. =======================================
  382.  
  383. These files contain a line for each icon in a list. A line consists of TAB-
  384. seperated parametres:
  385.  
  386. <type>    <width>    <select>    <adjust>
  387.  
  388. There are 14 icon types, some will only work in certain lists.
  389. Each has a default width. For some types, the width is taken from a sprite:
  390.  
  391. Type        Works in list    Default Width    Appearance
  392.  
  393. !face        N M        32        Plots the face if any
  394. !nick        N M        180        Nickname
  395. !host        N M        512        Hostmask
  396. !name         C        256        Channel name
  397. !topic         C        1024        Channel topic
  398. !join         C        join0        Join button
  399. !talkh        NC        32        Horizontal activity bar
  400. !talkv        NC        8        Vertical activity bar
  401. !friend        N M        friend0        Friend button
  402. !ignore        N M        ignore0        Ignore button
  403. !op          M        op0        Op button
  404. !voice          M        voice0        Voice button
  405. !watch        N        watch0        Watch button
  406. <sprite>    NCM        ?        Generic button
  407.  
  408. The <sprite> type is taken as a 'generic button'. The type is the name of the
  409. sprite to use. The sprite also determines the default width.
  410. If the sprite doesn't exist, the 'nosprite' button is used instead.
  411. These sprites reside in <LIRC$Dir>.Sprites
  412.  
  413. <width> allows you to adjust the widths relative to the default. This is a
  414. signed number of os-units.
  415.  
  416. If <adjust> or <select> are missing, nothing happens when you click.
  417. Otherwise the given command is executed. Parameters are given to all
  418. commands, and you can use them by including %<number>.
  419. The parameters are:
  420. %0    Channel name (current target in people list ('*' if none))
  421. %1    Nickname (nothing in channel list)
  422. %2    Hostmask (nothing in channel list)
  423.  
  424. There is a special type too:
  425. !space    <gap>
  426.  
  427. This doesn't create an icon, but leaves a gap instead. The default gap is
  428. 4 os-units between icons, but by using !space, you can have any gap. The
  429. amount you specify is added to the default, so 4 would leave a gap of 8,
  430. and -4 would leave no gap at all.
  431.  
  432. When experimenting with this, the commands "/load nickline", "/load chanline"
  433. and "/load membline" should prove useful. Again, is it best to save your
  434. modified files in !Boot.Choices, (which /save <list> will do for you), so they
  435. won't get overwritten if you upgrade.
  436.  
  437.  
  438. Text Styles
  439. ===========
  440.  
  441. When someone says something on a public channel, you see:
  442. <Nick> Hello
  443.  
  444. All the different things that might happen, have a certain way of being
  445. printed, and a certain colour. All these definitions are called the current
  446. 'Style'. It is stored in the Style file. You can change style with the /style
  447. command, and then use '/save style' when you're satisfied.
  448.  
  449. In order to change them, you must know how the styles are defined.
  450. The lines in the Style file, and the arguments given to /style are exactly
  451. the same.
  452.  
  453. Each line starts with a list of style types, or the word "default". If there
  454. is a default entry, it must be the first line, because all style types are
  455. changed when this is seen. This applies to the command as well.
  456.  
  457. The style types are given in hex. The first digit says something about where
  458. the text will be printed:
  459.  
  460. 0x    There's an exact window open for this Forum (see below)
  461. 1x    There is no exact window open, and the Forum is not a channel.
  462. 2x    There is no exact window open, and the Forum is a channel.
  463.  
  464. The last hex digit is the event type:
  465.  
  466. x0    PRIVMSG received
  467. x1    PRIVMSG sent
  468. x2    NOTICE received
  469. x3    NOTICE sent
  470. x4    Action received
  471. x5    Action sent
  472. x6    Child task input
  473. x7    Script input
  474. x8    Child task output
  475. x9    Script output
  476. xA    Commands sent
  477. xB    Unknown data
  478. xC    Internal text
  479. xD    WAllOps
  480. xE    Misc info about channel/nick
  481. xF    Error
  482.  
  483. So, for example, changing the style type 22 would affect any public notice
  484. received from a channel, for which you have no window open.
  485.  
  486. The 'Forum' means who or what the message is related to. It can be a nick,
  487. channel, child name, script title, or many other things. The only important
  488. thing here, is whether there's a window open with the Forum as a target.
  489.  
  490. The next word on the line is which colour the text should be. The names of
  491. the colours are listed further below. Note that using mIRC colours here would
  492. mean that bold text won't work.
  493.  
  494. Then follows the text format, given as a 'template string'. %0, %1 etc. are
  495. used to insert the relevant words.
  496.  
  497. %0 will be the message forum (nick, channel, etc.)
  498. %1 will be the source of the message (typically a nick, but in some cases it
  499.    will be '' if there is no relevant source).
  500. %2 will be the current time, using the format set in choices.
  501.  
  502. If there is another template after this, it controls what goes into the log
  503. file. If not, it will be the same as the printed text.
  504.  
  505. Please note, that all the spaces in the default prefixes are hard-spaces
  506. (ascii 160). This is to avoid the wordwrapping breaking the line between the
  507. prefix and the first word, if the first 'word' is very long (i.e. beyond the
  508. edge of the terminal window).
  509. You will probably want to use hard spaces too (can be entered with Alt-Space),
  510. unless this breaking effect is just what you're after.
  511.  
  512.  
  513. Scripts
  514. =======
  515.  
  516. Scripts are (usually small) programs, that enable you to do things that would
  517. be impossible in macros or /exec files.
  518.  
  519. The script language is very much like Basic, with some added features. Some
  520. knowledge of Basic will help a lot.
  521.  
  522. Scripts are stored in either Text or Basic files, anywhere. Often used scripts
  523. should be placed in the Script directory, because then you can refer to them
  524. by leafname instead of the full pathname.
  525.  
  526. This directory already contains some examples, referred to below.
  527.  
  528. Basics
  529. ------
  530.  
  531. A simple script could just be a series of commands, see 'Ex1'.
  532.  
  533. There are a few things to note in this example:
  534. 1. The '/' before commands has a special function in scripts. It works like
  535.    * in Basic, i.e. the rest of the line is a normal LIRC/IRC command. If you
  536.    need to refer to variables in the command, you use the equivalent of
  537.    Basic's "OSCLI", which is "DO".
  538. 2. The "SCRIPT" line must be present, it marks the end of the header, and
  539.    the start of the program.
  540. 3. Parameters are available through the ARG$() and ARGS$() functions.
  541.  
  542. With this example, you would be able to use commands like:
  543. /run ex1 orfey
  544. /run ex1 orfey tightly
  545. etc.
  546.  
  547.  
  548. Aliases
  549. -------
  550.  
  551. Even if you stored the above in a file called 'Hug', it would be nicer to
  552. have a _real_ command called "/hug" instead. This is where aliases come into
  553. the picture, and things get a bit more complicated. Consider 'Ex2'.
  554.  
  555. In this one, the following has changed:
  556. 1. Running the script does not actually send anything. But an alias will be
  557.    defined.
  558. 2. The 'IDLE' command is very important. This stops execution of the script,
  559.    but the script stays loaded. This lets you use the alias afterwards, which
  560.    would otherwise have been thrown away with the rest of the script's data.
  561. 3. We now define variables for parameters instead of using ARG$(). This is to
  562.    get the parameters given to the _alias_ (not to the script). If you had
  563.    used ARG$() here, it would have used the parameters given in the /run
  564.    command, like above. But that is not what we want in this case.
  565.  
  566. To use it, say "/run Ex2". Now you can use "/hug orfey" etc.
  567. It might be nice to have certain aliases available without having to run
  568. files first. For this purpose, there is a script called '!OnConnect'. It will
  569. be run after connecting to the server.
  570. In '!OnConnect', you could put either:
  571. 1. A command to /run your script defining the aliases.
  572. 2. The alias definitions themselves.
  573.  
  574. As all the other choices, it is best to store your own scripts in
  575. Boot.Choices.Script (create it if necessary), so they won't get overwritten.
  576.  
  577.  
  578. Parameter checking
  579. ------------------
  580.  
  581. Now what is wrong with the /hug command? You will see if you say "/hug".
  582. The text becomes "* You spots  in the corner..." etc.
  583.  
  584. The solution is to check the supplied parameters, exactly like a built-in
  585. command would have done. See 'Ex3'.
  586.  
  587. The effect should be pretty obvious. There are two things to note by now:
  588. 1. The titles of the last two scripts have been the same, and that is no
  589.    coincidence. Scripts are _identified_ by their title, and it is used to
  590.    kill them, for example. Also, when a script is started, any other script
  591.    with the same title will be killed. This is why the examples are all
  592.    called 'Example', otherwise you would end up with several of them running
  593.    (but idle), even though the latest alias definition would override all the
  594.    others as expected.
  595. 2. The first example didn't have a TITLE line, so it got its leafname as
  596.    title instead.
  597.  
  598. Checking the parameters properly is of course important, if you're aliasing
  599. an existing command. You could, for example make a 'join' alias, that would
  600. both join a channel and open a window. Here it is important to remember that
  601. join takes more than one parameter, if the channel is +k (needs a password).
  602.  
  603. If you need to use a standard command that has been aliased, the method is
  604. the same as in Obey files: Prefix the command with %. This is very important
  605. to remember when aliasing standard commands, because you could easily end
  606. up with the alias calling itself indefinitly.
  607. Don't make it do this, it's a mess (because the programs are parallel, they
  608. don't wait for each other).
  609.  
  610.  
  611. Using events
  612. ------------
  613.  
  614. So far, the examples have only been able to act on commands typed by you.
  615. However, it is sometimes desirable to make them react on things happening on
  616. IRC. To this end, you can use events.
  617. There are several different types, see below for a complete list.
  618.  
  619. Events are used much like aliases. To receive a certain event, you simply
  620. define the appropriate routine. 'Ex4' is an example.
  621.  
  622. This will simply display the arguments received, when a PubMsg event happens.
  623. Replace 'PubMsg' with any other event type to see the arguments for that.
  624. Note that most events do not give exactly 4 arguments. If they give less,
  625. the remaining variables will be empty strings. If they give more, the last
  626. variable will contain the rest, separated by spaces.
  627. This applies, no matter how many variables you give in the EVENT definition.
  628.  
  629. Note that events, like IRC, are highly asynchronous. This means that you can't
  630. expect events in any particular order, except of course that responses always
  631. come _after_ the command that triggers them.
  632.  
  633. Also note that events are subject to filters like everything else. If all
  634. messages from a certain source have been ignored, you won't get message
  635. events either.
  636.  
  637.  
  638. Event type    Arguments        Description
  639. ———————————————————————————————————————————————————————————————————————————
  640. PrivMsg        Nick,Text        Happens when receiving a private
  641.                     message from somebody. Note this
  642.                     differs from the IRC 'PRIVMSG', which
  643.                     can be either private or public.
  644. PubMsg        Channel,Nick,Text    This event is triggered when someone
  645.                     speaks in public on a channel you have
  646.                     joined.
  647. PrivNotice    Nick,Text        As PrivMsg, when it's a notice.
  648. PubNotice    Channel,Nick,Text    As PubMsg, when it's a notice.
  649. PubCTCP        Channel,Nick,Type,Data    A CTCP to a channel.
  650. PubCTCPRep    Channel,Nick,Type,Data    A CTCP reply to a channel, as above.
  651. PrivCTCP    Nick,Type,Data        A CTCP to you.
  652. PrivCTCPRep    Nick,Type,Data        A CTCP reply to you.
  653. DCC        Type,Data        These happen while a DCC is in
  654.                     progress. See below for details.
  655. Join        Channel,Nick,[F]    This happens when someone joins a
  656.                     channel. The F is present if the
  657.                     person is in your list of friends.
  658. Topic        Channel,Nick,Text    Someone has changed topic on a channel
  659.                     you are on.
  660. Leave        Channel,Nick        Someone left a channel you are on.
  661. Kick        Channel,Nick1,Nick2,Reason
  662.                     Nick1 has kicked Nick2 off the Channel,
  663.                     giving the Reason supplied.
  664. Quit        Forum,Nick,Reason    When someone you can see leaves IRC.
  665.                     Forum is either Nick, or a channel
  666.                     common to you and Nick.
  667. Kill        Source,Forum,Nick,Reason
  668.                     Source has forcefully removed Nick
  669.                     from IRC, giving the Reason. Forum is
  670.                     either Nick, or the channel common to
  671.                     you both.
  672. ChanMode    Channel,Nick,Change    Nick has changed a Channel's mode
  673.                     flags. The Change is e.g. "+i"
  674. UserMode    Channel,Nick,Target,Change
  675.                     Nick has changed the mode for Target,
  676.                     related to Channel. This can be
  677.                     several different things, e.g. the
  678.                     Target could be another nick, and the
  679.                     change "+o", "+v" etc. Or the target
  680.                     could be a usermask and the change
  681.                     "+b".
  682. Nick        Nick1,Nick2        Nick1 has changed name to Nick2.
  683. Invite        Channel,Nick        Nick invites you to Channel.
  684. Flood        Type,Host        Happens when Host flooded you enough
  685.                     to get auto-ignored.
  686. WallOps        Source,Text        Message from Source to all IRCOps.
  687. Response    Source,Type,Data    This is a general response to various
  688.                     commands. The Type says what it is,
  689.                     refer to rfc1459 for a list of types.
  690. Error        Source,Type,Data    Same as Response, but these are
  691.                     errors (Type 400 and higher).
  692. SentMsg        Nick,Text        Happens when sending a private message
  693.                     to somebody.
  694. SentNotice    Nick,Text        As SentMsg, when it's a notice.
  695. SentCTCP    Nick,Type,Data        A CTCP from you.
  696. SentCTCPRep    Nick,Type,Data        A CTCP reply from you.
  697. Watch        Type,Nick        When a nick that is being watched
  698.                     appears or leaves IRC. Type is either
  699.                     "here" or "gone".
  700.  
  701. The above are all related to events happening on IRC. Apart from these,
  702. the are also some internal events:
  703.  
  704.  
  705. Event type    Arguments    Description
  706. ———————————————————————————————————————————————————————————————————————————
  707. User        Script,Data    This event is generated by the /UserEvent
  708.                 command, and can be used by scripts to send
  709.                 data to each other. Script is the sender, and
  710.                 Data is whatever you want it to be.
  711. HotKey        Code,Index,Text    Happens when you press a key in the entry icon,
  712.                 which wouldn't otherwise do anything. The Code
  713.                 is the key code, and Index is the current caret
  714.                 position in the line. The Text is whatever is
  715.                 in the entry icon at the time. It is often used
  716.                 in combination with the /Entry command.
  717. Enter        Text        Happens when you press Return in the entry
  718.                 icon. The default action is to execute Text as
  719.                 a command. Use this to e.g. grab the event and
  720.                 issue a different command given certain input
  721.                 lines.
  722. Child        Name,Text    Happens when a child task has printed a line of
  723.                 text. The Name is the name given in the /task
  724.                 command, with a @ prefix.
  725. SentChild    Name,Text    Happens when you send a message to a child.
  726. Exit        Reason        This event happens just before the execution of
  727.                 the script stops. See below for details.
  728. Input        Text        This happens when you 'talk' to the script, by
  729.                 using /msg $<name>, or having it selected as
  730.                 current target etc. It is up to you what Text
  731.                 is used for.
  732. Title        Target        Happens when setting the title of a terminal
  733.                 window. You can grab this event and use
  734.                 /Set Title to set your own title.
  735. BadTarget    Target,Operation,Arguments
  736.                 This happens when trying to e.g. talk to a
  737.                 target that has an illegal name. See below.
  738.  
  739.  
  740. Finally, you can get events when something happens in the wimp (like the ones
  741. returned from a normal poll loop). They all supply a pointer to the normal
  742. block returned from the wimp. The difference here is, that the single pointer
  743. argument _must_ be supplied, even if it isn't used.
  744.  
  745. There is another difference. You can't use PRINT or similar VDU output while
  746. inside these wimp events. Well, you can, but it will appear on the desktop,
  747. not in the terminal window. Use DISPLAY instead.
  748. It is futile to 'grab' wimp events, as you are the only one that sees them
  749. anyway.
  750.  
  751.  
  752. Event type    Description
  753. ———————————————————————————————————————————————————————————————————————————
  754. W_Null        Null reason code
  755. W_Redraw    Redraw window request
  756. W_Open        Open window request
  757. W_Close        Close window request
  758. W_P_Leave    Pointer leaving window
  759. W_P_Enter    Pointer entering window
  760. W_Mouse        Mouse click
  761. W_Drag        User drag box
  762. W_Key        Key pressed
  763. W_Menu        Menu selection
  764. W_Scroll    Scroll request
  765. W_C_Lose    Lose caret
  766. W_C_Gain    Gain caret
  767. W_PWord        Poll word non-zero
  768. W_Msg        User message
  769. W_MsgR        User message recorded
  770. W_MsgA        User message acknowledge
  771. W_Toolbox    Toolbox event
  772.  
  773. About HotKey
  774. ------------
  775. If you are going to act on a keypress, you must _immediately_ use the
  776. ACKKEY statement. It has to be before making commands etc. because otherwise
  777. the key will be passed on to other scripts, and eventually to the wimp for
  778. further processing. In that case you could get several things happening with
  779. only one keypress.
  780.  
  781. About DCC
  782. ---------
  783. There are 12 different types of these. They are all called DCC, but the Type
  784. says what actually happened:
  785.  
  786. DCC,"rx_resume",From,Size,Pathname,Pos    If resuming from offset Pos
  787. DCC,"rx_start",From,Size,Pathname    When reception starts
  788. DCC,"rx_end",From,Size,Pathname        When complete
  789. DCC,"rx_abort",From,Size,Pathname    If aborted by you
  790. DCC,"rx_lost",From,Size,Pathname    If aborted by sender
  791. DCC,"rx_error",From,Size,Pathname,Error    Any other error
  792.  
  793. DCC,"rx_resume",From,Size,Pathname,Pos    If resuming from offset Pos
  794. DCC,"tx_start",To,Size,Pathname        When transmission starts
  795. DCC,"tx_end",To,Size,Pathname        When complete
  796. DCC,"tx_abort",To,Size,Pathname        If aborted by you
  797. DCC,"tx_lost",To,Size,Pathname        If aborted by receiver
  798. DCC,"tx_error",To,Size,Pathname,Error    Any other error
  799.  
  800. Note that in the case of reception, it is possible to receive a file of unknown
  801. size. Size will be 0 in this case, and the transfer won't end with rx_end as
  802. normal, it will be rx_lost when the sender closes the connection.
  803.  
  804. About Exit
  805. ----------
  806. You can use this to release any system resources you might have claimed (such
  807. as sockets). Be careful of generating errors in the exit routine, because if
  808. you do, they will be reported by the wimp (in an error box), hence halting
  809. the multitasking. Also, PRINT won't work, use DISPLAY instead.
  810.  
  811. Reason may be one of:
  812. "End"        At normal END or QUIT statements.
  813. "Wimp quit"    When a wimp quit message was received.
  814. "Kill"        Because of the "/script kill" command.
  815. "Restart"    A script started with the same title.
  816. "LIRC"        Because the LIRC that started the script died.
  817. <error message>    Anything else.
  818.  
  819. About BadTarget
  820. ---------------
  821. When trying to do things like "/msg *bob hello", this event happens because
  822. a nickname can't start with *. The event can then be used by scripts that
  823. give a special meaning to targets like that. Grabbing the event means that
  824. LIRC won't print '! Unknown target', and you can then take appropriate action
  825. instead. The event supplies three arguments:
  826. Target        Is the illegal target
  827. Operation    Can be one of:
  828.         "talk"        When the operation was /msg or similar.
  829.         "note"        When it was /notice.
  830.         "creq"        When it was a ctcp request, e.g. /ping
  831.         "crep"        When it was a ctcp reply. This is not often
  832.                 encountered.
  833.         "kill"        When the /kill command was used.
  834. Arguments    Is whatever else was supplied, e.g. the text of the /msg.
  835.         In case of creq and crep, the string does not contain the
  836.         enclosing <1>'s.
  837.  
  838.  
  839. Is this Basic or what?
  840. ----------------------
  841.  
  842. It is very close. You can do everything that would be possible in Basic, but
  843. there are some further requirements. The header is one requirement, there
  844. must be at least a 'SCRIPT' statement.
  845. Furthermore, if you use the / statement, it must either be on a line of its
  846. own, OR preceeded by a colon.
  847.  
  848. Be aware that the desktop will stall if you make a loop that takes a long time.
  849. If you do need a long loop, put in NOP statements to allow the multitasking
  850. to work.
  851.  
  852. There are certain identifiers you shouldn't use:
  853.  
  854. 1. FNevent_*
  855. 2. FNalias_*
  856. 3. Any integer variable, string variable, PROC, or FN whose name is shorter
  857.    than 4 characters and ends in '_'".
  858.  
  859. Defining any of these will probably mess up everything, so don't.
  860.  
  861. Otherwise you are safe. Be aware, that if you use EVAL on your own integer or
  862. string variables, it won't work on names shorter than 3 characters. This is
  863. because they are being renamed (to the above) in order to avoid clashing with
  864. the library variables.
  865.  
  866. In fact, you can use A%..H%,L%,O%,P% safely, without them being renamed. This
  867. is to enable the use of assembler.
  868.  
  869.  
  870. Case sensitivity
  871. ----------------
  872.  
  873. Which parts of scripts are case sensitive have not been told yet.
  874. If you _assume_ case sensitivity in all parts, you can't go wrong. But of
  875. course there are rules for it.
  876. All keywords and variables, both Basic and script ones are case sensitive.
  877. Event types, and alias names are case insensitive.
  878. LIRC/IRC commands, whether written after / or using DO, are case insensitive.
  879. The exception to this, is if the command would be tokenised, e.g. /CLS.
  880. When using /, it is best to stick to mixed or lower case, if you do not know
  881. for certain which keywords might get tokenised.
  882.  
  883.  
  884. List of non-basic functions
  885. ---------------------------
  886.  
  887. Functions returning numerics:
  888.  
  889. ACCEPT(S%)    waits for a connection attempt on the listening socket S%.
  890.         When one is received, it creates a socket and connects,
  891.         returning the number of the connected socket.
  892. C_ACT(C$)    returns the time when the channel C$ was last active.
  893. C_SEEN(C$)    returns the time when the channel C$ was last seen.
  894. CONNECT(H$,P%)    creates a socket and connects it to host H$, port P%. Returns
  895.         the socket number (or generates an error).
  896. EXIST(O$)    returns TRUE if the object (dir/file etc.) exists.
  897. H_IGNORE(H$)    returns the filter type of hostmask H$. See F_TYPE$().
  898. H_FRIEND(H$)    returns TRUE if the hostmask H$ is a friendly one.
  899. HTON(A%)    converts between host and network byte order in an address.
  900. ISALPHA(Code)    returns TRUE if the ascii code is an alphabetic character.
  901. M_NAMES(C$)    returns the number of members on channel C$.
  902. M_OF(C$,N$)    returns TRUE if nick N$ is a member of channel C$.
  903. M_OP(C$,N$)    returns TRUE if nick N$ is an op in channel C$.
  904. M_VOICE(C$,N$)    returns TRUE if nick N$ has a voice in channel C$.
  905. N_SEEN(N$)    returns the time when the nick N$ was last seen.
  906. N_ACT(N$)    returns the time when the nick N$ was last active.
  907. NOW        returns the current monotonic time.
  908. NTOH(A%)    equivalent to HTON(A%).
  909. RESOLVE(H$)    returns the IP of host H$ (or an error).
  910. SERVER(P%)    creates a listening socket on port P%. P% can be 0 to allocate
  911.         a free port.
  912. SPOS(A$,B$,P)    is like INSTR(A$,B$,P), but case-insensitive.
  913. T_OPEN(T$)    returns TRUE if there is a window open for target T$.
  914. WCMPS(S$,W$)    returns TRUE if S$ is a match of the wildcarded string W$.
  915. WCMPI(S$,W$)    does the same, but is case-insensitive.
  916.  
  917. The functions returning a 'time', do so in relation to NOW. I.e. if you
  918. want to know how many seconds have passed since 'Chocky' was seen, use:
  919. (NOW-N_SEEN("chocky"))/100
  920. They all return 0 if the nick/channel is unknown.
  921.  
  922. Functions returning strings:
  923.  
  924. ARG$(N)        returns argument number N+1, given to the /run command.
  925.         In other words, ARG$(0) is the first.
  926. ARGS$(N,M)    returns arguments N+1 through M+1. If M is -1, returns from N+1
  927.         onwards until the last.
  928. C_TOPIC$(C$)    returns the topic of channel C$, if known.
  929. COL$(C$)    returns a suitable ctrl-sequence for selecting colour C$.
  930. F_TYPE$(T)    converts a filter type into a string describing it.
  931. FIRSTARG$(A$)    returns the first argument in a space-seperated string of
  932.         arguments. Updates A$ to contain the rest (so it must be a
  933.         variable, not a string expression).
  934. LASTMSG$    returns the most recent person to send you a private message.
  935. LEAF$(S$)    returns the leafname of the full pathname S$.
  936. LOWER$(S$)    returns S$ in lowercase.
  937. M_NAMES$(C$)    returns a space-seperated list of members on channel C$.
  938. N_HOST$(N$)    returns the hostmask of nick N$, as "userid@host".
  939. N_NAME$(N$)    returns the nick of nick N$. The point of that is, that it will
  940.         return "" if the nick has not been seen. Also, N$ is case-
  941.         insensitive, whereas the result has the correct case.
  942. NICK$        returns your current nickname.
  943. PATH$(S$)    returns the path part of the full pathname S$.
  944. PROVIDER$(A$)    returns the name of the script currently providing the A$
  945.         command (as an alias). Returns "" if it is unknown.
  946. RXLINE$(S%)    loops until a line is received from socket S%. Generates an
  947.         error if the connection is closed by the other end.
  948. SOURCE$        returns the URL where the latest version is found.
  949. T_OPEN$        returns a list of the targets that have a terminal window open.
  950. TARGET$        returns the current target (nick/channel).
  951. TITLE$        returns the title of this script (after expansion, if any).
  952. THISFILE$    returns the full pathname of the script running.
  953. UPPER$(S$)    returns S$ in uppercase.
  954. VERSION$    returns the version of LIRC.
  955.  
  956. Use of colours
  957. --------------
  958.  
  959. When printing text from scripts, you can change colour in 3 ways:
  960. 1. Using CHR$2 to select a bold version of the current colour.
  961. 2. Using CHR$3 to select a mIRC colour.
  962. 3. Using COL$("name") to select any colour.
  963.  
  964. The third way is of course the best. HOWEVER, if you are sending the text to
  965. someone on IRC, you have to use the first or second method.
  966.  
  967. 1. The bold colours work on the standard colours, not the mIRC ones. You
  968.    simply toggle the effect with CHR$2, like this:
  969.    PRINT "This is " CHR$2 "bold" CHR$2 ", and this is not"
  970.  
  971. 2. The mIRC colours are 16 colours used by mIRC and some other clients. They
  972.    are selected by a CHR$3+"nn", where NN is a number between 0 and 99 (they
  973.    repeat after every 16). Example:
  974.    PRINT "This is " CHR$3 "04red" CHR$3 "."
  975.    Note that every other CHR$3 turns it off, like bold.
  976.  
  977. 3. The COL$() function returns a colour change sequence given a named colour.
  978.    This is much better, as the colour numbers may change but the names will
  979.    not. Also, you can select any of the 40 colours this way. Example:
  980.    PRINT "This word is " COL$("private") "private"
  981.    
  982.    The colour names are case-insensitive. This is the list:
  983.  
  984.    Background,Public,Private,Misc        These are the same as in the
  985.    Selection,Internal,URL,Script        Colour menu. They refer to the
  986.    Child,Command,Error,Unknown            type of text rather than the
  987.                            colour.
  988.  
  989.    B_*                        With a B_ prefix (e.g. B_Child)
  990.                            you get the bold version of
  991.                            that colour.
  992.  
  993.    M_White,M_Black,M_Blue,M_Green        All the mIRC colours. These
  994.    M_Red,M_Brown,M_Magenta,M_Orange        names refer to the colour, and
  995.    M_Yellow,M_Lime,M_Cyan,M_Aqua        there is no specific use for
  996.    M_Royal,M_Purple,M_Grey,M_Silver        them.
  997.  
  998. You may discover that COLOUR <n> also changes colour. However, this method is
  999. not recommendable, since the colour numbers may change.
  1000.  
  1001.  
  1002. List of non-basic keywords
  1003. --------------------------
  1004.  
  1005. ACKKEY
  1006. Acknowledges that you have dealt with the HotKey event. Stops the event from
  1007. being sent to any other scripts, and stops LIRC from eventually sending it
  1008. to other hotkey applications. GRABEVENT can also be used, and does the same.
  1009.  
  1010. AUTHOR author
  1011. Defines the author of the script. This is only valid in the header (i.e. before
  1012. SCRIPT). The author is a literal string of characters, and if it contains
  1013. spaces, it must be enclosed in quotes. It is only used for reporting in a
  1014. status report.
  1015.  
  1016. BOO
  1017. Breaks out of SLEEP state prematurely.
  1018.  
  1019. DEFALIAS(command,arg1$,arg2$,...,argN$)
  1020. Defines an alias routine. The command argument is not an expression, it is
  1021. a literal string of characters (not enclosed in double quotes).
  1022.  
  1023. DO string
  1024. Sends the string expression to LIRC, as if it was typed into the entry icon.
  1025.  
  1026. END, QUIT
  1027. Terminates the script normally.
  1028.  
  1029. ENDALIAS
  1030. Terminates the ALIAS routine.
  1031.  
  1032. ENDEVENT
  1033. Terminates the EVENT routine.
  1034.  
  1035. DEFEVENT(type,arg1$,arg2$,...,argN$)
  1036. Defines an event routine. Like alias, "type" is a literal string, not a
  1037. variable or expression. arg1$ etc. is however many arguments you want to
  1038. access using the given string variables. They will be local to the event
  1039. routine in question, so you can use the same variables, even if another event
  1040. occurs while inside the routine.
  1041.  
  1042. DEFEVENT(type,block%)
  1043. Same as above, except for the wimp events (which give a pointer to the event
  1044. block instead of strings).
  1045.  
  1046. DISPLAY string
  1047. Prints the string in the terminal window, like PRINT would. But this command
  1048. can be used in wimp event routines, and it is a more immediate form of
  1049. printing.
  1050.  
  1051. GRABEVENT
  1052. Claims an event in an event routine. This will stop other scripts getting the
  1053. event, and stop LIRC from performing the fallback action. The wimp events are
  1054. 'grabbed' by default, i.e. there is no fallback action if you have defined a
  1055. routine in the script.
  1056.  
  1057. IDLE
  1058. Puts the program in an endless multitasking loop. From there on, only alias
  1059. and event routines will be executed. This should only be used in the main
  1060. part of the program, unless you want the stack to continually grow.
  1061.  
  1062. KILL number
  1063. Closes the socket <number>. You don't usually need to do this, as all sockets
  1064. created will be removed when the script dies.
  1065.  
  1066. MEMORY kilobytes
  1067. 1. When used in the header:
  1068.    Sets the amount of memory the script gets for extra workspace. On top of
  1069.    this, memory will be added for the actual program, plus control routines.
  1070. 2. When used inside the script:
  1071.    Extends your workspace (temporarily) by the given amount.
  1072. If you allocate too much, it will be released as soon as you start multi-
  1073. tasking, so if you need it, you must make use of it.
  1074. If you need less than 2K between each poll, you can just DIM what you need,
  1075. and the wimpslot will extend when necessary.
  1076.  
  1077. NOP
  1078. Lets other programs run for a while. This command is needed if you take a
  1079. long time doing something, which would otherwise stall the desktop until
  1080. completed.
  1081.  
  1082. OUTPUT number
  1083. This changes what kind of event the script output (from PRINT and DISPLAY)
  1084. will be. The event types are listed above in the Style section. Apart from
  1085. these, there is a special one which is 64. This type is a "raw" kind of
  1086. printing, with no prefixes and no style entry.
  1087. The default event type is 9, i.e. 'Script output'.
  1088.  
  1089. SCRIPT
  1090. Divides the header from the main program. Execution starts after this command.
  1091.  
  1092. SLEEP number
  1093. Like IDLE, it loops around doing nothing but aliases and events. But it
  1094. only does this for the specified number of centiseconds, then normal
  1095. execution resumes.
  1096. Note that if you use this statement in an event or alias routine, you should
  1097. make sure the routine is re-entrant.
  1098.  
  1099. STOP
  1100. Terminates the program with the error "Stopped".
  1101.  
  1102. TITLE title
  1103. Defines the title of the script. This is only valid in the header (i.e. before
  1104. SCRIPT). The title is a literal string of characters, not an expression. If it
  1105. contains % it must be enclosed in quotes. Spaces in the title are not allowed.
  1106. %0, %1 etc. can be used, and will make the title depend on the command
  1107. arguments given to the /run command. This allows several instances of the same
  1108. script.
  1109.  
  1110. TXLINE number,string
  1111. Sends string to the socket <number>. It will be sent as a line, i.e. with CRLF
  1112. on the end.
  1113.  
  1114. USEREVENT string
  1115. Generates a user event, with the given string expression as data.
  1116.  
  1117.  
  1118. List of Basic keywords, that are special
  1119. ----------------------------------------
  1120.  
  1121. As a general rule, you can use any Basic function, including assembler etc.
  1122. But there are some operations that might give unexpected results, mostly
  1123. because you are writing a multitasking program. If you are used to this,
  1124. you shouldn't find anything really unexpected in the following list:
  1125.  
  1126. CIRCLE,CLG,DRAW,ELLIPSE,FILL,GCOL,LINE,MOVE,ORIGIN,PLOT,POINT,RECTANGLE,TINT:
  1127. Plotting graphics directly will most probably mess up the desktop.
  1128.  
  1129. COUNT,POS,VPOS,WIDTH:
  1130. Doesn't return anything meaningful.
  1131.  
  1132. *,OSCLI:
  1133. You can use CLI commands, but don't run anything that might be loaded on top
  1134. of the current application. If you need to run programs, use *WimpTask.
  1135. * must be on its own line, or be preceeded by a colon.
  1136.  
  1137. GET,GET$,INKEY,INKEY$,INPUT,INPUTLINE,LINEINPUT:
  1138. These work, but are unsuitable for wimp programs. They stop multitasking
  1139. while waiting for input.
  1140.  
  1141. HIMEM=,END=,LOMEM=,PAGE=:
  1142. Use MEMORY instead of END= and HIMEM=.
  1143. LOMEM= and PAGE= are not relevant in scripts.
  1144.  
  1145. INSTALL,LIBRARY,OVERLAY:
  1146. Will work, but you may need to make sure you have space for it. Use MEMORY
  1147. to allocate more memory.
  1148.  
  1149. MOUSE:
  1150. Is not nice in the wimp, as it removes an entry from the mouse buffer,
  1151. causing clicks to be missed. Use Wimp_GetPointerInfo instead, if you must.
  1152. Don't use MOUSE TO at all.
  1153.  
  1154. ON ERROR:
  1155. You can use error handlers, but keep to local ones. Always call the default
  1156. error handler if the program is going to exit because of the error.
  1157.  
  1158. TIME=:
  1159. You can read TIME, but don't assign a value to it.
  1160.  
  1161.  
  1162. Children
  1163. ========
  1164.  
  1165. You can start child tasks with the /task command. These will be run by
  1166. TaskWindow, and any output will be displayed in a special style for this
  1167. purpose. There is also a Child-event, which happens when this text is output.
  1168. Using this, it is possible to make scripts that control the childres they start
  1169. themselves, but with LIRC as the taskwindow parent.
  1170. Using the SendChild event you can get at the input send to the child, and
  1171. have it displayed in a different way perhaps.
  1172.  
  1173. Use the flush-time to deal with tasks that display input prompts. It can be
  1174. set to 0, but then there is a danger of breaking up the lines, which would
  1175. make it harder to deal with the output-events. Setting flush_time to X, will
  1176. _guarantee_ silence from the task for X seconds before the event happens, and
  1177. that is the most useful option.
  1178.  
  1179.  
  1180. The rest
  1181. ========
  1182.  
  1183. I sure hope I get time to finish this manual :-)
  1184.  
  1185.  
  1186. Credits
  1187. =======
  1188.  
  1189. Thanks are due to:
  1190.  
  1191. Gerph    - for good ideas, countless protocols, and support programs.
  1192.  
  1193. abca     - for extensive testing and putting up with it.
  1194.            And the voice buttons :-)
  1195.  
  1196. Chocky   - for extensive testing and a long list of suggestions.
  1197.  
  1198. technium - lots of good suggestions, and script testing.
  1199.  
  1200. crispE   - for a better icon sprite...
  1201.  
  1202. rjw      - for virtually _all_ the sprites in use now :-)
  1203.  
  1204. N        - more suggestions...
  1205.  
  1206. daco     - more suggestions...
  1207.  
  1208. Spanners - for !SocketMgr
  1209.  
  1210. chasm    - for giving a new meaning to the word "face".
  1211.  
  1212. And the rest of you, you know who you are.
  1213.  
  1214.  
  1215. Licence
  1216. =======
  1217.  
  1218. This program is PD, and there is of course no guarantee.
  1219.  
  1220. You may use this privately as much as you like, and give it away if you want.
  1221. But it may not be supplied as (part of) any commercial product without getting
  1222. my permission.
  1223.  
  1224. 30 Aug 1998
  1225. Thomas Olsson
  1226. tolsson@isa.dknet.dk
  1227.  
  1228.